<extend name="./Application/Home/View/master.html" />
<block name="title">
    <script>
        var ajaxUpdateCart = "{:u('ajaxUpdateCart')}";
    </script>
    <script>
        var ajaxDelCart = "{:u('ajaxDelCart')}"
    </script>
    <div id="content">
        <?php if($data['goods']){ ?>
        <form action="{:u('Home/Accounts/index')}" method="post">
            <div class="car main">
                <div class="carshop">
                    <div class="cartitle">
                        <div class="carcheck">
                            <div class="checkbox">
                                <span class="check checkon" id="allcheck"></span>
                            </div>
                            全选</div>
                        <div class="carname">商品名称</div>
                        <div class="carmoney">单价</div>
                        <div class="carnum">数量</div>
                        <div class="carcount">小计</div>
                        <div class="carhandle">操作</div>
                    </div>
                    <foreach name="data[goods]" key="k" item="vo">
                    <div class="shopcontent">
                        <div class="shopcheck"><div class="checkbox">
                            <span class="check checkon"></span>
                            <input type="checkbox" name='sid[]' value="{$k}" checked="checked" class="checkhide"/>
                        </div>
                        </div>
                        <div class="shopname">
                            <div class="carimg">
                                <!--图片-->
                                <a href=""><img src="__ROOT__/{$vo['pic']}"/></a>
                            </div>
                            <p>
                                <a href="#">{$vo.name}</a>
                                <volist name="vo['options']" id="m" >
                                    <!--颜色尺码-->
                                <span>{$key}:{$m}/</span>
                                </volist>
                            </p>
                        </div>
                        <!--单价-->
                        <div class="shopmoney">{$vo['price']}</div>
                        <div class="shopnum">

                            <a href="javascript:;" class="num_l" sid="{$k}">-</a>
                            <!--数量-->
                            <input type="text" value="{$vo['num']}" />
                            <a href="javascript:;" class="num_r" sid="{$k}">+</a>
                        </div>

                        <!--商品小计-->
                        <div class="shopcount">{$vo['total']}元</div>
                        <div class="shophandle" ><span sid="{$k}">x</span></div>
                    </div>
                    </foreach>

                </div>
                <div class="jiesuan">
                    <div class="jixu"><a href="">继续购物</a></div>
                    <!--商品数量-->
                    <div class="gongji">共计<span>{$data['total_rows']}</span>件商品</div>
                    <div class="heji">合计<span>{$data['total']}</span></div>
                    <div class="gou">
                        <?php if(isset($ses['uid'])){?>
                        <input type="submit" value="去结算"/>
                        <?php }else{ ?>
                        <a style="display: block;width: 200px;text-align: center;color: #fff;line-height: 60px;background: #36aa3f;border: none;" href="{:u('Home/Login/index')}">去结算</a>
                        <?php } ?>
                    </div>

                </div>
            </div>
        </form>
        <?php }else{ ?>
        <div style="padding: 120px;text-align: center">购物车中暂无商品,<a href="__ROOT__" style="color:red">继续购物</a></div>
        <?php } ?>

    </div>

</block>